﻿<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:local="clr-namespace:RoleEditer" 
	xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" 
	x:Class="RoleEditer.MainPage"
    d:DesignHeight="600" d:DesignWidth="900" mc:Ignorable="d">

	<Grid x:Name="LayoutRoot" Background="White">
		<Grid.RowDefinitions>
			<RowDefinition Height="0.065*"/>
			<RowDefinition Height="0.935*"/>
		</Grid.RowDefinitions>
		<Grid x:Name="ImageOutPanel" Margin="211,8,8,185" Grid.Row="1" Background="#FFE4E4E4" MouseLeftButtonDown="ImageOutPanel_Click">
			<Grid Height="1" VerticalAlignment="Center" HorizontalAlignment="Center" Width="200" d:IsLocked="True">
				<Path Data="M45.5,172 L366.5,172" Fill="#FFF4F4F5" Stretch="Fill" Stroke="Black" UseLayoutRounding="False"/>
				<Path Data="M45.5,172 L366.5,172" Fill="#FFF4F4F5" Stretch="Fill" Stroke="Black" UseLayoutRounding="False" RenderTransformOrigin="0.5,0.5">
					<Path.RenderTransform>
						<CompositeTransform Rotation="-90"/>
					</Path.RenderTransform>
				</Path>
			</Grid>
			<Canvas x:Name="roleCanvas" HorizontalAlignment="Center" Height="0" VerticalAlignment="Center" Width="0"/>
		</Grid>
		<ScrollViewer x:Name="framesScrollViewer" Height="152" Margin="211,0,8,29" Grid.Row="1" VerticalAlignment="Bottom" ScrollViewer.HorizontalScrollBarVisibility="Visible" ScrollViewer.VerticalScrollBarVisibility="Disabled">
			<StackPanel x:Name="frameStackPanel" Height="125" HorizontalAlignment="Left" Orientation="Horizontal"/>
		</ScrollViewer>
		<Button Content="打开Spirit文件" HorizontalAlignment="Left" Margin="8,208,0,0" Grid.Row="1" Width="114" FontSize="12" Height="35" VerticalAlignment="Top" d:LayoutOverrides="VerticalAlignment" Click="OpenSpiritFile_Click"/>
		<Button Content="删除选定" HorizontalAlignment="Left" Margin="126,208,0,0" Grid.Row="1" Width="81" FontSize="12" Height="35" VerticalAlignment="Top" d:LayoutOverrides="VerticalAlignment" Click="Delete_SelectAniItem"/>
		<Button Content="移除" HorizontalAlignment="Left" Height="35" Margin="115,0,0,146" Grid.Row="1" VerticalAlignment="Bottom" Width="92" FontSize="12" Click="RemoveFrame_Click"/>
		<Button Content="前移" HorizontalAlignment="Left" Height="35" Margin="8,0,0,107" Grid.Row="1" VerticalAlignment="Bottom" Width="96" FontSize="12" IsEnabled="False" Click="Frameforward_click"/>
		<Button x:Name="btn_play" Content="播放" HorizontalAlignment="Left" Height="35" Margin="8,0,0,185" Grid.Row="1" VerticalAlignment="Bottom" Width="199" FontSize="12" Click="PlayANI_Click"/>
		<Button Content="添加" HorizontalAlignment="Left" Height="35" Margin="8,0,0,146" Grid.Row="1" VerticalAlignment="Bottom" Width="96" FontSize="12" Click="AddFrames_Click"/>
		<Button Content="后移" HorizontalAlignment="Left" Height="35" Margin="115,0,0,107" Grid.Row="1" VerticalAlignment="Bottom" Width="92" FontSize="12" IsEnabled="False" Click="FrameBack_Click"/>
		<TextBlock HorizontalAlignment="Left" Height="19" Margin="8,0,0,230" Grid.Row="1" TextWrapping="Wrap" Text="速度" VerticalAlignment="Bottom" Width="44" FontSize="12"/>
		<TextBox x:Name="textTimeSpan" HorizontalAlignment="Left" Height="28" Margin="52,0,0,225" Grid.Row="1" TextWrapping="Wrap" Text="33" VerticalAlignment="Bottom" Width="59" FontSize="12" TextAlignment="Center" TextChanged="SpeedValueChanged"/>
		<TextBlock HorizontalAlignment="Left" Height="19" Margin="115,0,0,230" Grid.Row="1" TextWrapping="Wrap" Text="毫秒" VerticalAlignment="Bottom" Width="44" FontSize="12"/>
		<Button Content="保存到Spirit文件" HorizontalAlignment="Left" Margin="8,247,0,0" Grid.Row="1" Width="114" FontSize="12" Height="35" VerticalAlignment="Top" Click="SaveSpiritFile_Click"/>
		<Button Content="重命名" HorizontalAlignment="Left" Margin="126,247,0,0" Grid.Row="1" Width="81" FontSize="12" Height="35" VerticalAlignment="Top" Click="Rename_Click"/>
		<Button Content="▲&#xd;&#xa;▲" HorizontalAlignment="Left" Height="94" Margin="8,8,0,0" Grid.Row="1" VerticalAlignment="Top" Width="28" IsEnabled="False"/>
		<Button Content="▼&#xd;&#xa;▼" HorizontalAlignment="Left" Height="98" Margin="8,106,0,0" Grid.Row="1" VerticalAlignment="Top" Width="28" IsEnabled="False"/>
		<sdk:TreeView x:Name="packTreeView" HorizontalAlignment="Left" Height="196" Margin="40,8,0,0" VerticalAlignment="Top" Width="167" Grid.Row="1">
			<sdk:TreeViewItem x:Name="treeViewItemsRoot" Header="画布" Margin="-8,0,0,0" IsExpanded="True">
				<Button Content="新建一个角色" Width="96" Click="NewSpiritFile_Click"/>
			</sdk:TreeViewItem>
		</sdk:TreeView>
		<TextBox x:Name="offsetX" HorizontalAlignment="Left" Height="28" Margin="45,0,0,29" Grid.Row="1" TextWrapping="Wrap" Text="0" VerticalAlignment="Bottom" Width="59" FontSize="12" TextAlignment="Center" TextChanged="OffsetXValueChanged"/>
		<TextBox x:Name="offsetY" HorizontalAlignment="Left" Height="28" Margin="148,0,0,29" Grid.Row="1" TextWrapping="Wrap" Text="0" VerticalAlignment="Bottom" Width="59" FontSize="12" TextAlignment="Center" TextChanged="OffsetYValueChanged"/>
		<TextBlock HorizontalAlignment="Left" Height="19" Margin="8,0,0,29" Grid.Row="1" TextWrapping="Wrap" Text="偏移X" VerticalAlignment="Bottom" Width="44" FontSize="12"/>
		<TextBlock HorizontalAlignment="Left" Height="19" Margin="108,0,0,29" Grid.Row="1" TextWrapping="Wrap" VerticalAlignment="Bottom" Width="44" FontSize="12"><Run Text="偏移"/><Run Text="Y"/></TextBlock>
		<Grid x:Name="offsetModes" HorizontalAlignment="Left" Height="25" Margin="8,0,0,61" Grid.Row="1" VerticalAlignment="Bottom" Width="199">
			<RadioButton Content="各自独立" HorizontalAlignment="Left" Width="96" GroupName="offsetMode" Checked="offsetModes_Checked"/>
			<RadioButton Content="所有一致" HorizontalAlignment="Right" Width="92" IsChecked="True" GroupName="offsetMode" Checked="offsetModes_Checked"/>
		</Grid>
	</Grid>
</UserControl>
